dnl --------------------------------------------------------------------
dnl configure.ac for WickDD slate bitmap generator.
dnl
dnl Created 2006.06.10 by Warren Young
dnl
dnl Copyright (c) 2006 by Pixel Corps.  This program may be used under
dnl the terms of the X11 license, a copy of which should have accompanied
dnl this program, in the LICENSE file.
dnl --------------------------------------------------------------------

AC_INIT(FrameBuffer.h)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(slategen, 0.01)


dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_MAKE_SET


dnl Check for SDL library
SDL_VERSION='1.2.4'
AM_PATH_SDL($SDL_VERSION, [],
	AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"


dnl Check for SDL_gfx library
have_sdlgfx=no
AC_CHECK_LIB(SDL_gfx, pixelColor, have_sdlgfx=yes)
if test x$have_sdlgfx = xno; then
    AC_MSG_ERROR([
*** Unable to find SDL_gfx library
])      
fi          


dnl Check for SDL_image library
have_sdlimage=no
AC_CHECK_LIB(SDL_image, IMG_Load, have_sdlimage=yes)
if test x$have_sdlimage = xno; then
    AC_MSG_ERROR([
*** Unable to find SDL_image library
])      
fi          


dnl Check for SDL_ttf library
have_sdlttf=no
AC_CHECK_LIB(SDL_ttf, TTF_Init, have_sdlttf=yes)
if test x$have_sdlttf = xno; then
    AC_MSG_ERROR([
*** Unable to find SDL_ttf library
])      
fi          

CFLAGS="$SAVE_CFLAGS"
LIBS="$SAVE_LIBS"


dnl Checks for functions
AC_LANG_C
AC_LANG_CPLUSPLUS


dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)


AC_OUTPUT(
	Makefile
)

